#######################
# This creates Table 6, tabular results of question wording experiment 2
########################

#find n for each condition
t6n<-svytable(~p_over,nd)

#create vector with total n, conditional n
#add as column to existing results
fig7$n<-c(t6n[1],t6n[2],sum(t6n))
fig7$n<-signif(fig7$n,4)

#format table
T6<-fig7

#convert mean, se, and ci to percentages
T6$itf<-100*T6$itf
T6$se<-100*T6$se
T6$ci_lo<-100*T6$ci_lo
T6$ci_hi<-100*T6$ci_hi

#add descriptive values for conditions
T6$p_over<-c("Even if People are Hurt and Killed","No Consequences","All Respondents")

#add descriptive column names
rownames(T6)<-c("Even if People are Hurt and Killed","No Consequences","Total")

colnames(T6)<-c("Question Wording","Mean Agree or Strongly Agree (%)","Standard Error (%)","95% CI Low","95% CI High","Observations")

write.csv(T6,"../Main Results/T6.csv")